import request from '@/utils/request'

export function listApp(query) {
    return request({
        url: '/system/app/list',
        method: 'get',
        params: query
    })
}

export function listAppVersion(query) {
    return request({
        url: '/system/app/version/list',
        method: 'get',
        params: query
    })
}

export function getListApp() {
    return request({
        url: '/system/app/appList',
        method: 'get',
    })
}

export function delAppList(id) {
    return request({
        url: '/system/app/delete/' + id,
        method: 'delete',
    })
}

export function delAppListVersion(id) {
    return request({
        url: '/system/app/version/delete/' + id,
        method: 'delete',
    })
}

export function appViewForm(id) {
    return request({
        url: '/system/app/' + id,
        method: 'get',
    })
}

export function appViewFormVersion(id) {
    return request({
        url: '/system/app/version/' + id,
        method: 'get',
    })
}

export function postApp(data) {
    return request({
        url: '/system/app',
        method: 'post',
        data: data
    })
}

export function postAppVersion(data) {
    return request({
        url: '/system/app/version',
        method: 'post',
        data: data
    })
}

export function putApp(data) {
    return request({
        url: '/system/app',
        method: 'put',
        data: data
    })
}
